<div class="row-fluid">
	<div class="span12">
		<ul class="breadcrumb">
			<li>
				<a href="index.php"> <i class="radmin-icon radmin-home"></i> Dashboard </a>
				<span class="divider">/</span>
			</li>
			<li class="active"><i class="radmin-icon radmin-folder-2"></i> System Logs</li>
		</ul>
	</div>
</div>
<div class="row-fluid">
	<div class="span12">
		<h4 class="title">
			<a href="#"><i class="radmin-icon radmin-help"></i> </a> System Logs
		</h4>
		<div class="squiggly-border"></div>
		
		<?php $this->renderPartial('partial/searchTab', array('active' => 'action')); ?>
		
		<div class="tab-content">
			<div class="tab-pane active" id="action">
				<?php $this->widget('zii.widgets.grid.CGridView', array(
					'id' => 'logaction_grid',
					'summaryText' => '',
					'dataProvider' => $logAction->search(),
					'columns' => array(
						array(
							'header' => 'Action ID',
							'value' => '$data->id_log_action',
							'htmlOptions' => array('class' => 'id_log_action')
						),
						array(
							'header' => 'Date / Time',
							'value' => 'date("M/d/Y g:i:s A", strtotime($data->time_date));',
							'htmlOptions' => array('class' => 'time_date'),
							'headerHtmlOptions' => array('class' => 'time_sort'),
							'name' => 'time_sort',
							'sortable' => true
						),
						array(
							'header' => 'Action',
							'value' => '$data->statuswithextrainfo',
							'headerHtmlOptions' => array('class' => 'status'),
						),
						array(
							'header' => 'Username',
							'value' => '$data->usernameshow',
							'headerHtmlOptions' => array('class' => 'status'),
						),
					),
					'itemsCssClass' => 'table table-striped',
					'pagerCssClass' => 'pagination pagination-right',
					'pager' => array(
						'class' => 'LinkPager',
						
						
						
					),
					'htmlOptions' => array(
						'class' => ''
					)
				));?>

				<script>
					var sort = <?php echo json_encode($sort); ?>;
					sort = sort.split('.');
					if(sort[1] == 'desc'){
						var arrow = $('<i class="icon-arrow-down hidden-phone"></i>');
					}else{
						var arrow = $('<i class="icon-arrow-up hidden-phone"></i>');
					}
					$('#logaction_grid th.'+sort[0]).append(arrow);
				</script>
			
				<h5>Search Login Activity</h5>
				<?php $this->renderPartial('forms/_actionactivitysearch', array('actionActivitySearchForm' => $actionActivitySearchForm)); ?>
			</div>
		</div>
	</div>
</div>